import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity } from 'typeorm';
import { BaseEntity } from '../../../base.entity';

@Entity({ name: 'sys_operation_log' })
export default class SysOperationLog extends BaseEntity {
  @Column({ type: 'varchar', length: 50, name: 'type', comment: '操作类型', nullable: true })
  @ApiProperty()
  type: string;

  @Column({ type: 'varchar', length: 50, name: 'msg', comment: '操作说明', nullable: true })
  @ApiProperty()
  msg: string;

  @Column({
    type: 'varchar',
    name: 'database_operation_log_list',
    comment: '数据库操作日志',
    nullable: true,
  })
  @ApiProperty()
  databaseOperationLogList: string;

  @Column({
    type: 'varchar',
    name: 'ip',
    comment: 'ip',
    nullable: true,
  })
  @ApiProperty()
  ip: string;

  @Column({
    type: 'varchar',
    name: 'mac',
    comment: 'mac',
    nullable: true,
  })
  @ApiProperty()
  mac: string;

  @Column({ type: 'float', nullable: true, comment: '是否需要同步主机', name: 'sync_host_sqlite' })
  @ApiProperty()
  syncHostSqlite: number;

  @Column({ type: 'varchar', nullable: true, comment: '备注' })
  @ApiProperty()
  remark: string;
}
